﻿/*=========================================================================
  Program:   pangu
  Module:    Project.h
  Author: huan.liu, sen.wang

  Copyright (c) CQAI
  All rights reserved.

 * @class   Project
 * @brief   create project
=========================================================================*/
#pragma once

#include <memory>
#include <string>
class Geometry;
class Mesh;
struct MeshDict;

namespace conduit_cpp
{
	class Node;
}

class Project
{
public:
  Project();
  virtual ~Project();

  void CreateWorkSpace(const std::string& workspace);
  void SetBlueCFDEnv(const std::string& blueCFDPath);
  void AddGeometry(std::shared_ptr<Geometry> geometry);
  void InitWorkSpace(const conduit_cpp::Node& node);
  void AddMesh(std::shared_ptr<Mesh> mesh);
  void GenerateBoundBoxing(const conduit_cpp::Node& node);
  bool BuildMesh();

  //void update()

private:
  void CreateSubWorkSpace_i();
  void CopyGeometryToTarget_i();
  //void EditGeometrySolid_i();

  void UpdateControlDict_i();
  void UpdateMeshDict_i(const conduit_cpp::Node& node);
  void UpdateFvSchemes_i();
  void UpdateFvSolution_i();
  void UpdateDecomposeParDict();

  void UpdateaIncludeInitialConditions_i();
  void UpdateaIncludeFixedInlet_i();
  void UpdateaIncludefrontBackUpperPatches_i();

  void UpdateaNut_i();
  void UpdateaPressure_i();
  void UpdateaVelocity_i();
  void UpdateaOmega_i();
  void UpdateaEpsilon_i();
  void UpdateaKinetic_i();

  void UpdateaTransportProperties_i();
  void UpdateaTurbulenceProperties_i();


private:
  std::string m_WorkSpace;
  std::string m_SystemSubSpace;
  std::string m_ConstantSubSpace;
  std::string m_InitializeSubSpace;
  std::string m_initializeIncludeSubWorkspace;
  std::string m_boundBoxPara;
  std::shared_ptr<Geometry> m_Geometry;
  std::shared_ptr<Mesh> m_Mesh;

private:
  Project(const Project& project) = delete;
  Project& operator=(const Project& project) = delete;
};